package ac.leedsmet.devmanager.core;

import java.io.Serializable;

/**
 * The Story object should only be created via the IssueManagerImpl class.
 * <pre>
 * StoryManagerImpl storyManager = new StoryManagerImpl(project);
 * Story story = storyManager.createStory("Story Name");
 * </pre>
 * @author Mike
 * @author Samael
 * @author Takamura
 * @version 1.0
 * @see StoryManagerImpl#createStory(String)
 */
public class Story implements Serializable,Status {

    private long storyId;
    private String title;
    private String asA;
    private String iWant;
    private String soThat;
    private String assignee;
    private String effort;
    private float compPercentage;
    private String attachment;
    private boolean active = true;

    protected Story(long storyId) {
        this.storyId = storyId;
    }

    public void setTitle(String Title) {
        title = Title;
    }

    public String getTitle() {
        return title;
    }

    public void setAsA(String AsA) {
        asA = AsA;
    }

    public String getAsA() {
        return asA;
    }

    public void setIWant(String IWant) {
        iWant = IWant;
    }

    public String getIWant() {
        return iWant;
    }

    public void setSoThat(String SoThat) {
        soThat = SoThat;
    }

    public String getSoThat() {
        return soThat;
    }

    public String getAssignee() {
        return assignee;
    }

    public void setAssignee(String assignee) {
        this.assignee = assignee;
    }

    public void setEffort(String Effort) {
        effort = Effort;
    }

    public String getEffort() {
        return effort;
    }

    public void setCompPercentage(float CompPercent) {
        compPercentage = CompPercent;
    }

    public float getCompPercentage() {
        return compPercentage;
    }

    public void setAttachment(String Attachment) {
     attachment = Attachment;
    }

    public String getAttachment() {
     return attachment;
    }

    public long getStoryId() {
        return storyId;
    }

    @Override
    public void deactivate() {
        active = false;
    }

    @Override
    public void activate() {
        active = true;
    }

    /**
     * @return Returns true or false depending if the story is active or not
     */
    @Override
    public boolean isActive() {
        return active;
    }
}
